package PTA.Mianxiangduixiang.ex18;

import Person.ith_34.Ma;

import javax.swing.plaf.synth.SynthButtonUI;
import java.util.Scanner;

class Ring{
    private int innerRadius;
    private int outerRadius;
private double s;
    public int getInnerRadius() {
        return innerRadius;
    }

    public void setInnerRadius(int innerRadius) {
        this.innerRadius = innerRadius;
    }

    public int getOuterRadius() {
        return outerRadius;
    }

    public void setOuterRadius(int outerRadius) {
        this.outerRadius = outerRadius;
    }
    Ring(int innerRadius,int outerRadius){
        this.innerRadius = innerRadius;
        this.outerRadius=outerRadius;
        System.out.println("constructor");
    }
    Ring(){
        System.out.println("constructor");
        this.innerRadius = 1;
        this.outerRadius = 3;

    }
    public int getArea(){
        s= Math.PI*outerRadius*outerRadius-Math.PI*innerRadius*innerRadius;
        return (int)s;
    }
}


public class ex18 {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
int inner = sc.nextInt();
int outer = sc.nextInt();
Ring r = new Ring(inner,outer);
        System.out.println(r.getArea());
        Ring r2 = new Ring();
        System.out.println(r2.getArea());

    }
}
